﻿@model BlogMVC.ModelEntity.Article

@{
    ViewBag.Title = "Create";
    Layout = "~/Areas/Admin/Views/Shared/_LayoutAdmin.cshtml"; 
}

<h2>Create</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>


@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Article</legend>


        <div class="khung">
        <div class="lable"><span>CategoryId</span></div>
            @Html.EditorFor(model => model.CategoryId)
            @Html.ValidationMessageFor(model => model.CategoryId)

        </div>

           <div class="khung">
             <div class="lable"><span>Status</span></div>
             @Html.TextAreaFor(model => model.Status, new { @class = "hhh" })
            @Html.ValidationMessageFor(model => model.Status)
           </div>

            <div class="khung">
           <div class="lable"><span>Name</span></div>
            @Html.TextAreaFor(model => model.Name, new { style = "width:500px;height:20px" })
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="khung">
        <div class="lable"><span>Lead</span></div>
            @Html.TextAreaFor(model => model.Lead, new { style = "width:500px;height:60px" })
            @Html.ValidationMessageFor(model => model.Lead)
        </div>

       <div class="khung">
            @Html.TextAreaFor(model => model.Detail)
            @Html.ValidationMessageFor(model => model.Detail)
        </div>
        <div class="khung">
        <div class="lable"><span>ImageLink</span></div>
     <input type="file" name="file" id="file"size="40" value="Select Picture"/>
        </div>

        <div class="khung">
        <div class="lable"><span>Publish Date</span></div>
            @Html.EditorFor(model => model.PublishDate)
            @Html.ValidationMessageFor(model => model.PublishDate)
        </div>

       <div class="khung">
        <div class="lable"><span>Author</span></div>
            @Html.TextAreaFor(model => model.Author, new { style = "width:300px;height:20px" })
            @Html.ValidationMessageFor(model => model.Author)
        </div>
        <div class="khung">
        <div class="lable"><span></span></div>
        <p><input type="submit" value="save" /></p>
        </div>
      
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

<script type="text/javascript">
    CKEDITOR.replace('Detail');
</script>

  